home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 076-100 / disk_097 / shm / shm_future.c < prev    next >
C/C++ Source or Header  |  1992-05-06  |  3KB  |  114 lines

  1. /************************************************************************
  2.                            Future Requester                 8th August 87
  3. ************************************************************************/
  4. #include <intuition/intuition.h>
  5.  
  6. #include "shm_defines"
  7.  
  8. extern struct TextAttr Fnt;
  9.  
  10. /************************************************************************
  11.                            Future Definitions
  12. ************************************************************************/
  13. struct IntuiText future_continue_txt =
  14.        {1, 0, JAM1, 8, 2, &Fnt, (UBYTE *)"Continue", NL};
  15.  
  16. struct IntuiText jtxt[] =
  17. {
  18. {1, 0, JAM1, 200, 5, &Fnt,
  19. "Possible Future Improvements",
  20. &jtxt[1]},
  21. {1, 0, JAM1, 20, 20, &Fnt,
  22. "1) Storage and retrieval of images on disk in IFF format.",
  23. &jtxt[2]},
  24. {1, 0, JAM1, 20, 35, &Fnt,
  25. "2) Prevent the ugly cycling of menu bar colours.",
  26. &jtxt[3]},
  27. {1, 0, JAM1, 20, 50, &Fnt,
  28. "3) A separate menu option to turn the title bar on and off. I tried",
  29. &jtxt[4]},
  30. {1, 0, JAM1, 20, 60, &Fnt,
  31. "   SetWindowTitles() with a null WindowTitle but this gives a blank",
  32. &jtxt[5]},
  33. {1, 0, JAM1, 20, 70, &Fnt,
  34. "   title bar, it doesn't remove it. RefreshWindowFrame() with",
  35. &jtxt[6]},
  36. {1, 0, JAM1, 20, 80, &Fnt,
  37. "   Wdw->Title = null does the same. I also tried a borderless backdrop",
  38. &jtxt[7]},
  39. {1, 0, JAM1, 20, 90, &Fnt,
  40. "   window and controlled a screen title with ShowTitle() but the current",
  41. &jtxt[8]},
  42. {1, 0, JAM1, 20, 100, &Fnt,
  43. "   method of using 'Erase' seems best so far.",
  44. &jtxt[9]},
  45. {1, 0, JAM1, 20, 115, &Fnt,
  46. "4) Have the window view only a part of a larger RastPort so the 'Centre'",
  47. &jtxt[10]},
  48. {1, 0, JAM1, 20, 125, &Fnt,
  49. "   setting could move the picture without redrawing it.",
  50. NULL}
  51. };
  52.  
  53. struct Image future_continue_img = {0,0, 80,11, 1, NL, 0, 2, NL};
  54.  
  55. struct Gadget future_continue_gad =
  56. {
  57. NL,
  58. 554, 176, 80, 11,
  59. GADGHBOX | GADGIMAGE, RELVERIFY | ENDGADGET,
  60. BOOLGADGET | REQGADGET,
  61. (APTR)&future_continue_img, NL,
  62. &future_continue_txt,
  63. NL, NL, 1, NL
  64. };
  65.  
  66. struct Requester future_req;
  67.  
  68. SHORT future_border_coords[] = {0,0, 639,0, 639,189, 0,189, 0,0};
  69.  
  70. struct Border future_border =
  71. {
  72. 0, 0,
  73. 1, 0, JAM1,           /* White Border */
  74. 5, &future_border_coords[0],
  75. NL
  76. };
  77.  
  78. /************************************************************************
  79.                              Future Function
  80. ************************************************************************/
  81. future(cW)
  82. struct Window *cW;
  83. {
  84. struct IntuiMessage *message;
  85. BOOL loop;
  86. int class;
  87.  
  88. InitRequester(&future_req);
  89.  
  90. future_req.LeftEdge = 0;
  91. future_req.TopEdge = 10;
  92. future_req.Width = 640;
  93. future_req.Height = 190;
  94. future_req.ReqGadget = &future_continue_gad;
  95. future_req.ReqText = &jtxt[0];
  96. future_req.BackFill = 3;
  97. future_req.Flags = 0;
  98. future_req.ReqBorder = &future_border;
  99.  
  100. Request(&future_req,cW);
  101.  
  102. loop = TRUE;
  103.  
  104. while (loop)
  105.       {
  106.       Wait(1 << cW->UserPort->mp_SigBit);
  107.       message = (struct IntuiMessage *) GetMsg(cW->UserPort);
  108.       class = message->Class;
  109.       ReplyMsg(message);
  110.       if (class == REQCLEAR) loop = FALSE;
  111.       }
  112. return(TRUE);
  113. }
  114.